#!/usr/bin/env python3
# coding:utf-8
""" 
解析请求的数据
"""
from flask import Flask, request

app = Flask(__name__)

@app.route('/login', methods=['POST','GET'])
def login():
    data = request.json
    username = data.get('username')
    password = data.get('password')
    
    keyword = request.args.get('keyword')
    
    return f'用户名: {username}, 密码: {password}, 搜索关键字: {keyword}'

if __name__ == '__main__':
    app.run(host='0.0.0.0',port=8808)